package org.edu.jgame.cardgames;

import org.newdawn.slick.*;
import org.newdawn.slick.state.*;

public class JCardGame extends StateBasedGame {

	public static final int MAINMENUSTATE = 0;
	public static final int GAMEPLAYSTATE = 1;
	public static final int CREDITSTATE = 2;
	public static final int OPTIONSTATE = 3;
	public static final int CONNECTSTATE = 4;
	
	public JCardGame() {
		super("Heart Card Game");
		
		this.addState(new MainMenuState(MAINMENUSTATE));
		this.addState(new GameplayState(GAMEPLAYSTATE));
		this.addState(new CreditMenu(CREDITSTATE));
		this.addState(new OptionMenu(OPTIONSTATE));
		this.addState(new ConnectState(CONNECTSTATE));
		this.enterState(MAINMENUSTATE);
		
	}

	public static void main(String[] args) throws SlickException {
		AppGameContainer app = new AppGameContainer(new JCardGame());
		
		app.setDisplayMode(800, 600, false);
		app.start();

	}

	@Override
	public void initStatesList(GameContainer gameContainer) throws SlickException {
		this.getState(MAINMENUSTATE).init(gameContainer, this);
		this.getState(GAMEPLAYSTATE).init(gameContainer, this);
		this.getState(CREDITSTATE).init(gameContainer, this);
		this.getState(OPTIONSTATE).init(gameContainer, this);
		this.getState(CONNECTSTATE).init(gameContainer, this);
	}

}
